﻿/*
 * Created by SharpDevelop.
 * User: Christian Pacella
 * Date: 2010/10/29
 * Time: 11:14 PM
 */
using System;
using System.ComponentModel;
using System.Drawing;
using System.Design;

/// <summary>
// MiniApp class to be displayed in the property grid
/// </summary>
///
[DefaultPropertyAttribute("AppName")]
public class MiniApp
{
	private string _assemblyTitle = "MyApp";
	private string _assemblyIconFilename = string.Empty;
	private string _applicationFilename = "MyApp.exe";
	private string _applicationFilepath = string.Empty;
	private string _assemblyVersion = "1.0.*";
	private string _assemblyCopyright = "Copyright © " + DateTime.Now.Year;
	private string _assemblyCompany = "Christian Pacella Software";
	private string _assemblyDescription = "Compiled by Sharp Mini Compiler";
	private bool _optimizeCode = true;
	private bool _winFormsExecutable = true;
	private bool _includeAssemblyIcon = false;
	private bool _saveBeforeBuild = true;
	
	// Name property with category attribute and
	// description attribute added
	[CategoryAttribute("Assembly Information"), 
	DescriptionAttribute("The Assembly Title.")]
	public string AssemblyTitle
	{
	    get { return this._assemblyTitle; }
	    set { this._assemblyTitle = value; }
	}
	
	[CategoryAttribute("Assembly Information"),
	DescriptionAttribute("The Assembly Company information.")]
	public string AssemblyCompany
	{
	    get { return this._assemblyCompany; }
	    set { this._assemblyCompany = value; }
	}
	
	[CategoryAttribute("Assembly Information"),
	DescriptionAttribute("The Assembly Description.")]
	public string AssemblyDescription
	{
	    get { return this._assemblyDescription; }
	    set { this._assemblyDescription = value; }
	}
	
	[CategoryAttribute("Assembly Information"),
	DescriptionAttribute("The Assembly Copyright notice.")]
	public string AssemblyCopyright
	{
	    get { return this._assemblyCopyright; }
	    set { this._assemblyCopyright = value; }
	}
	
	[CategoryAttribute("Assembly Information"),
	DescriptionAttribute("The Assembly Version.")]
	public string AssemblyVersion
	{
	    get { return this._assemblyVersion; }
	    set { this._assemblyVersion = value; }
	}
	
	[CategoryAttribute("Application Settings"),
	DescriptionAttribute("The path to the application.")]
	[System.ComponentModel.Editor(
    typeof(System.Windows.Forms.Design.FolderNameEditor),
    typeof(System.Drawing.Design.UITypeEditor))]
	public string ApplicationFilePath
	{
	    get { return this._applicationFilepath; }
	    set { this._applicationFilepath = value; }
	}
		
	[CategoryAttribute("Application Settings"),
	DescriptionAttribute("The application filename (exe).")]
	public string ApplicationFileName
	{
	    get { return this._applicationFilename; }
	    set { this._applicationFilename = value; }
	}
	
	[CategoryAttribute("Application Settings"),
	DescriptionAttribute("Specify whether to include an icon for the application.")]
	public bool IncludeAssemblyIcon
	{
	    get { return this._includeAssemblyIcon; }
	    set { this._includeAssemblyIcon = value; }
	}
	
	[CategoryAttribute("Application Settings"),
	DescriptionAttribute("The path and filename of the icon file to use for the application.")]
	[System.ComponentModel.Editor(
    typeof(System.Windows.Forms.Design.FileNameEditor),
    typeof(System.Drawing.Design.UITypeEditor))]
	public string AssemblyIconFileName
	{
	    get { return this._assemblyIconFilename; }
	    set { this._assemblyIconFilename = value; }
	}
	
	[CategoryAttribute("Compiler Settings"),
	DescriptionAttribute("Optimize code output.")]
	public bool OptimizeCode
	{
	    get { return this._optimizeCode; }
	    set { this._optimizeCode = value; }
	}

	[CategoryAttribute("Compiler Settings"), 
	DescriptionAttribute("Build a Windows Forms or Console application.")]
	public bool WinFormsExecutable
	{
	    get { return this._winFormsExecutable; }
	    set { this._winFormsExecutable = value; }
	}
	
	[CategoryAttribute("Compiler Settings"), 
	DescriptionAttribute("Save source code before build.")]
	public bool SaveBeforeBuild
	{
	    get { return this._saveBeforeBuild; }
	    set { this._saveBeforeBuild = value; }
	}
	
	public MiniApp()
	{
	}
} 